//
//  ViewController.m
//  MV_C_P_VM
//
//  Created by Willian on 2021/4/29.
//

#import "ViewController.h"

#import "MVCViewController.h"
#import "MVPViewController.h"
#import "MVVMViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *mvcBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [mvcBtn setTitle:@"MVC" forState:UIControlStateNormal];
    [mvcBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    mvcBtn.frame = CGRectMake(50, 300, 200, 68);
    [mvcBtn addTarget:self action:@selector(mvcBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:mvcBtn];
    
    UIButton *mvpBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [mvpBtn setTitle:@"MVP" forState:UIControlStateNormal];
    [mvpBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    mvpBtn.frame = CGRectMake(50, 200, 200, 68);
    [mvpBtn addTarget:self action:@selector(mvpBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:mvpBtn];
    
    UIButton *mvvmBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [mvvmBtn setTitle:@"MVVM" forState:UIControlStateNormal];
    [mvvmBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    mvvmBtn.frame = CGRectMake(50, 400, 200, 68);
    [mvvmBtn addTarget:self action:@selector(mvvmBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:mvvmBtn];
}

- (void)mvcBtnClick{
    [self presentViewController:[[MVCViewController alloc] init] animated:YES completion:nil];
}

- (void)mvpBtnClick{
    [self presentViewController:[[MVPViewController alloc] init] animated:YES completion:nil];
}

- (void)mvvmBtnClick{
    [self presentViewController:[[MVVMViewController alloc] init] animated:YES completion:nil];
}



@end
